<div class="col-lg-12">
    <section class="panel">
        <header class="panel-heading">
            修改密码(Edit Password)
        </header>
        <div class="panel-body">
            <div class="position-center">
                <form action="/index/category/cate_pwd_deal"role="form" method="post" id="f_form">

                <div class="form-group">
                    <label for="exampleInputPassword1">原始密码(Old Password)</label>
                    <input name="opwd" type="password" value="" class="form-control" id="exampleInputPassword1">
                    <p class="help-block pwd"></p>
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1">新密码(New Password)</label>
                    <input name="pwd" type="password" value="" class="form-control" id="exampleInputPassword1" >
                    <p class="help-block npwd"></p>
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1">重复新密码(Repeat New Password)</label>
                    <input name="pwd1" type="password" value="" class="form-control" id="exampleInputPassword1" >
                    <p class="help-block rpwd"></p>
                </div>

                <button type="button" class="btn btn-info sub">Submit</button>
            </form>
            </div>

        </div>
    </section>
    <script type="text/javascript">
        $(function(){
            $(".sub").click(function(){
                $(".rpwd").html("");
                if($("input[name='opwd']").val()==''||$("input[name='opwd']").val()=='undefined'||$("input[name='pwd']").val()==''||$("input[name='pwd']").val()=='undefined'||$("input[name='pwd1']").val()==''||$("input[name='pwd1']").val()=='undefined'){
                    return;
                }
                if($("input[name='pwd']").val()!=$("input[name='pwd1']").val()){
                    $(".rpwd").html("两次密码不一致");return;
                } 
                $("#f_form").submit()               
            })
        })
    </script>
    

</div>